package com.wm.eduService.controller;

import com.wm.commonutils.R;
import io.swagger.annotations.Api;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: sshdg
 * @Date: 2020/9/28 9:18
 */
@RestController
//@CrossOrigin
@RequestMapping("/eduService/user")
@Api(tags = "登录")
public class EduLoginController {

    @PostMapping("/login")
    public R login(){
        return R.ok().data("token", "admin");
    }

    @GetMapping("/info")
    public R info(){
        return R.ok().data("roles", "[admin]")
                .data("name", "admin")
                .data("avatar", "https://sshdg-edu.oss-cn-shenzhen.aliyuncs.com/avatar.jpg");

    }


}
